package com.ruoyi.comn.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.comn.mapper.ComnQualityCheckersMapper;
import com.ruoyi.comn.domain.ComnQualityCheckers;
import com.ruoyi.comn.service.IComnQualityCheckersService;

/**
 * 质检员管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-23
 */
@Service
public class ComnQualityCheckersServiceImpl implements IComnQualityCheckersService 
{
    @Autowired
    private ComnQualityCheckersMapper comnQualityCheckersMapper;

    /**
     * 查询质检员管理
     * 
     * @param qualityCheckerUuid 质检员管理主键
     * @return 质检员管理
     */
    @Override
    public ComnQualityCheckers selectComnQualityCheckersByQualityCheckerUuid(String qualityCheckerUuid)
    {
        return comnQualityCheckersMapper.selectComnQualityCheckersByQualityCheckerUuid(qualityCheckerUuid);
    }

    /**
     * 查询质检员管理列表
     * 
     * @param comnQualityCheckers 质检员管理
     * @return 质检员管理
     */
    @Override
    public List<ComnQualityCheckers> selectComnQualityCheckersList(ComnQualityCheckers comnQualityCheckers)
    {
        return comnQualityCheckersMapper.selectComnQualityCheckersList(comnQualityCheckers);
    }

    /**
     * 新增质检员管理
     * 
     * @param comnQualityCheckers 质检员管理
     * @return 结果
     */
    @Override
    public int insertComnQualityCheckers(ComnQualityCheckers comnQualityCheckers)
    {
        comnQualityCheckers.setCreateBy(SecurityUtils.getUsername());
        comnQualityCheckers.setCreateTime(DateUtils.getNowDate());
        return comnQualityCheckersMapper.insertComnQualityCheckers(comnQualityCheckers);
    }

    /**
     * 修改质检员管理
     * 
     * @param comnQualityCheckers 质检员管理
     * @return 结果
     */
    @Override
    public int updateComnQualityCheckers(ComnQualityCheckers comnQualityCheckers)
    {
        comnQualityCheckers.setUpdateBy(SecurityUtils.getUsername());
        comnQualityCheckers.setUpdateTime(DateUtils.getNowDate());
        return comnQualityCheckersMapper.updateComnQualityCheckers(comnQualityCheckers);
    }

    /**
     * 批量删除质检员管理
     * 
     * @param qualityCheckerUuids 需要删除的质检员管理主键
     * @return 结果
     */
    @Override
    public int deleteComnQualityCheckersByQualityCheckerUuids(String[] qualityCheckerUuids)
    {
        return comnQualityCheckersMapper.deleteComnQualityCheckersByQualityCheckerUuids(qualityCheckerUuids);
    }

    /**
     * 删除质检员管理信息
     * 
     * @param qualityCheckerUuid 质检员管理主键
     * @return 结果
     */
    @Override
    public int deleteComnQualityCheckersByQualityCheckerUuid(String qualityCheckerUuid)
    {
        return comnQualityCheckersMapper.deleteComnQualityCheckersByQualityCheckerUuid(qualityCheckerUuid);
    }
}
